import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/components/Home'  //主页
import IndustryNews from '@/components/IndustryNews'  //行业资讯
import CompanyNews from '@/components/CompanyNews' //行业公司资讯
import Order from '@/components/Order' //订单管理
import Integral from '@/components/Integral' //订单管理
import Article from '@/components/Article'  //学院管理
import Add from '@/components/Add'  //添加文章
import Edit from '@/components/Edit' //修改文章

Vue.use(Router)

export default new Router({
  mode: 'history',
  routes: [
    {
      path: '/',
      name: 'home',
      component: Home,
      children: [
        {
          path: '',
          redirect: 'companyNews'
        },
        {
          path: 'college',
          component: Article,
          name: 'college'
        }, {
          path: 'college/addArticle',
          component: Add,
          name: 'addarticle'
        }, {
          path: 'college/editArticle',
          component: Edit,
          name: 'editArticle'
        },
        {
          path: 'industryNews',
          name: 'industryNews',
          component: IndustryNews
        },
        {
          path: 'companyNews',
          name: 'companyNews',
          component: CompanyNews
        },
        {
          path: 'order',
          name: 'order',
          component: Order
        },
        {
          path: 'integral',
          name: 'integral',
          component: Integral
        }]
    }
  ]
})
